module.exports =  {
  buttons: ['add', 'remove'],
  fields: [
    {
      code: 'tp_id',
      label: '类型主键',
      primaryKey: true,
      showTable: true,
      showOption: {
        width: '100'
      }
    },
    {
        code: 'tp_name',
        label: '类型名称',
        link: '/Home'
    }
  ],
  table: {
    selection: true,
    columns: [
      {
        prop: 'tp_id',
        label: '类型主键',
        width: '100'
      },
      {
        prop: 'tp_name',
        label: '类型名称',
        type: 'number',
        link: ['/Home', 'tp_name', 'tp_id'], // ---> /Home?tpName=${tp_name}&tpId=${tpId}
        validator: [
          {
            pattern: /\w{3,5}/,
            message: 'must 3~5'
          }
        ],
        addValidator: [
          {
            required: true,
            message: '必须填写名称'
          }
        ]
      }
    ]
  }
}

/**
 * 1. 列配置：
 *  - 列默认展现在表单中
 *  -
 */
